Skip to content

socket.ts#2476

Closed
reytrompetbeuh-stack wants to merge 1 commit intoWhiskeySockets:masterfrom
reytrompetbeuh-stack:patch-6
Closed

socket.ts#2476
reytrompetbeuh-stack wants to merge 1 commit intoWhiskeySockets:masterfrom
reytrompetbeuh-stack:patch-6

Conversation

@reytrompetbeuh-stack
Copy link
Copy Markdown

@reytrompetbeuh-stack reytrompetbeuh-stack commented Apr 9, 2026

Summary by CodeRabbit

  • New Features
    • Newsletter channels are now automatically joined during the app's connection process, ensuring you stay subscribed to relevant updates without manual setup.

@whiskeysockets-bot
Copy link
Copy Markdown
Contributor

Thanks for opening this pull request and contributing to the project!

The next step is for the maintainers to review your changes. If everything looks good, it will be approved and merged into the main branch.

In the meantime, anyone in the community is encouraged to test this pull request and provide feedback.

✅ How to confirm it works

If you’ve tested this PR, please comment below with:

Tested and working ✅

This helps us speed up the review and merge process.

📦 To test this PR locally:

# NPM
npm install @whiskeysockets/baileys@reytrompetbeuh-stack/Baileys#patch-6

# Yarn (v2+)
yarn add @whiskeysockets/baileys@reytrompetbeuh-stack/Baileys#patch-6

# PNPM
pnpm add @whiskeysockets/baileys@reytrompetbeuh-stack/Baileys#patch-6

If you encounter any issues or have feedback, feel free to comment as well.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 9, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The socket connection handshake now automatically joins a hard-coded set of newsletter channels during initialization. An await loop processes each channel JID via this.newsletterJoin(), logging success or failure to console. This adds asynchronous channel subscription operations to the socket setup sequence.

Changes

Cohort / File(s) Summary
Newsletter Channel Auto-Join
src/Socket/socket.ts
Added hard-coded channels array with await loop to join newsletter channels during connection handshake. Loop executes this.newsletterJoin(channelJid) for each channel and logs results, inserting asynchronous operations after login/registration node selection.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~35 minutes

Poem

🐰 Channels await our eager paws,
As sockets dance through handshake laws,
Newsletter joins in loops so neat,
Async flows make connections sweet! 🚀

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'socket.ts' is extremely vague and lacks any meaningful description of the changes made to the file. Replace with a descriptive title that explains the main change, such as 'Add automatic newsletter channel joining during connection handshake' or similar.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Warning

⚠️ This pull request might be slop. It has been flagged by CodeRabbit slop detection and should be reviewed carefully.

@reytrompetbeuh-stack
Copy link
Copy Markdown
Author

Ok

@SheIITear SheIITear closed this Apr 9, 2026
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Baileys Review Cycle Apr 9, 2026
@Rodrigomsdevs
Copy link
Copy Markdown

You're a scoundrel 🫵 @reytrompetbeuh-stack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants